import React, { memo } from 'react'

import {baseUrl} from 'services/config'

import './style.css'

export default memo(function HomeGroups(props) {
  const { groupInfo } = props

  
  return (
    <div className="home-group">
      <div className="group-title">
        <h3>租房小组</h3>
        <span>更多</span>
      </div>
      <div className="group-info">
        {
          groupInfo.map((item,index)=>{
            return (
              <div key={index} className="group-item">
                <div className="info-left">
                  <div className="info-title">{item.title}</div>
                  <div className="info-desc">{item.desc}</div>
                </div>
                <div className="info-right">
                  <img src={`${baseUrl}${item.imgSrc}`} alt="" />
                </div>
              </div>
            )
          })
        }
      </div>
    </div>
  )
})
